package com.springcloud.authentication.modules.entity;


import java.util.List;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.hibernate.annotations.GenericGenerator;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Administrator
 *
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name="sys_user")//对应数据库表名
@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
public class SysUser {

	@Id
	@GeneratedValue(generator = "jpa-uuid")
	@Column(length = 32)
	private String id; //主键id
	
	
	@Column
	private String name; //用户名
	
	@Column
	private String pwd; //密码
	
	@Column
	private String email; //邮箱
	
	@Column
	private String phone; //手机号

	@Transient
	private String roleNames; //角色名称，临时值
	
	@Transient
	private List<String> roles; 
	
	@Transient
	private List<SysRole> sysRole;
	
	@Transient
	private Set<String> sysPermission; //权限
	
}
